package com.zhouhailin;

/**
 * @Author zhouhailin
 * @date 2023/1/17 16:45
 */
public class WithoutOptionalDemo {
    class Member {
        private String name;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }

    public static void main(String[] args) {
        Member member = getMemberByIdFromDB();
//        if (member != null) {
            System.out.println(member.getName());
//        }
    }

    /**
     * 根据ID获取会员
     *
     * @return
     */
    public static Member getMemberByIdFromDB() {
        // 当前ID的会员不存在
        return null;
    }
}
